import React from "react";
import { BrowserRouter, Routes, Route, HashRouter } from "react-router-dom";
import Home from "./views/home";
import Car from "./views/car";
import My from "./views/my";
import './App1.css'
class App extends React.Component {
  render() {
    return (
      // 模式
      <BrowserRouter>
        {/* 匹配一个， 精确匹配 */}
        <Routes>
          {/* 路由项目 */}
          <Route path="/" element={<Home></Home>}></Route>
          <Route path="/car" element={<Car></Car>}></Route>
          <Route path="/my" element={<My></My>}></Route>
        </Routes>
      </BrowserRouter>
    );
  }
}

export default App;
